From 5c1cf70a61360774f8d7dbb7caf65fc1aee527d4 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Mon, 20 Aug 2007 22:24:19 +0000 Subject: [PATCH] bcr: Remove empty routes after read. --- bcr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bcr.c b/bcr.c index c9eaf340e..0be68f4f8 100644 --- a/bcr.c +++ b/bcr.c @@ -298,7 +298,12 @@ bcr_data_read(void) route_add_wpt(route, wpt); } - bcr_create_waypts_from_route(route); + + /* remove empty route */ + if (route->rte_waypt_ct == 0) + route_del_head(route); + else + bcr_create_waypts_from_route(route); } /* %%% bcr write support %%% ----------------------------------- */ -- 2.30.2